﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;

namespace Infrastructure.ExternalService.Core.Responses
{
    public class InterceptResponse
    {
        /// <summary>
        /// 电商订单号
        /// </summary>
        [JsonProperty("orderNo")]
        public string OrderNo { get; set; }

        /// <summary>
        /// 平台编码
        /// </summary>
        [JsonProperty("platformAppCode")]
        public string PlatformAppCode { get; set; }

        /// <summary>
        /// 手机号
        /// </summary>
        [JsonProperty("studentMobile")]
        public string StudentMobile { get; set; }

        /// <summary>
        /// 学员姓名
        /// </summary>
        [JsonProperty("studentName")]
        public string StudentName { get; set; }

        /// <summary>
        /// 订单创建时间
        /// </summary>
        [JsonProperty("orderCreatedTime")]
        public DateTime OrderCreatedTime { get; set; }

        /// <summary>
        /// 支付金额
        /// </summary>
        [JsonProperty("paymentAmount")]
        public long PaymentAmount { get; set; }

        /// <summary>
        /// 产品信息聚合
        /// </summary> 
        public List<InterceptedProductResponse> Products { get; set; }

        /// <summary>
        /// 班级定价信息
        /// </summary>
        [JsonProperty("pricing")]
        public List<InterceptedPricingResponse> Pricing { get; set; }

        /// <summary>
        /// 学员拆分结果
        /// </summary>
        [JsonProperty("students")]
        public List<InterceptedStudentResponse> Students { get; set; }
    }

    public class InterceptedProductResponse
    {
        /// <summary>
        /// 产品类别
        /// </summary>
        [JsonProperty("productType")]
        public string ProductType { get; set; }

        /// <summary>
        /// 产品类别名称
        /// </summary>
        [JsonProperty("productTypeName")]
        public string ProductTypeName { get; set; }

        /// <summary>
        /// 产品标识
        /// </summary>
        [JsonProperty("productId")]
        public string ProductId { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        [JsonProperty("productName")]
        public string ProductName { get; set; }

        /// <summary>
        /// 项目标识
        /// </summary>
        [JsonProperty("projectId")]
        public string ProjectId { get; set; }

        /// <summary>
        /// 项目名称
        /// </summary>
        [JsonProperty("projectName")]
        public string ProjectName { get; set; }

        /// <summary>
        /// 科目标识
        /// </summary>
        [JsonProperty("subjectId")]
        public string SubjectId { get; set; }

        /// <summary>
        /// 科目名称
        /// </summary>
        [JsonProperty("subjectName")]
        public string SubjectName { get; set; }

        /// <summary>
        /// 面授方法
        /// </summary>
        [JsonProperty("teachingMethod")]
        public string TeachingMethod { get; set; }

        /// <summary>
        /// 原价
        /// </summary>
        [JsonProperty("price")]
        public long Price { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        [JsonProperty("quantity")]
        public long Quantity { get; set; }

        /// <summary>
        /// 开课方式
        /// </summary>
        [JsonProperty("openCourseMethod")]
        public string OpenCourseMethod { get; set; }

        /// <summary>
        /// 支付金额
        /// </summary>
        [JsonProperty("paymentPrice")]
        public long PaymentPrice { get; set; }
    }


    public class InterceptedPricingResponse
    {
        /// <summary>
        /// 产品标识
        /// </summary>
        [JsonProperty("productId")]
        public string ProductId { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        [JsonProperty("productName")]
        public string ProductName { get; set; }

        /// <summary>
        /// 顺序号
        /// </summary>
        [JsonProperty("sequenceNo")]
        public string SequenceNo { get; set; }

        /// <summary>
        /// 原价
        /// </summary>
        [JsonProperty("price")]
        public long Price { get; set; }

        /// <summary>
        /// 支付金额
        /// </summary>
        [JsonProperty("paymentPrice")]
        public long PaymentPrice { get; set; }
    }

    public class InterceptedStudentResponse
    {
        /// <summary>
        /// 学员姓名
        /// </summary>
        [JsonProperty("name")]
        public string Name { get; set; }

        /// <summary>
        /// 学员手机号
        /// </summary>
        [JsonProperty("mobile")]
        public string Mobile { get; set; }

        /// <summary>
        /// 产品拆分结果
        /// </summary>
        [JsonProperty("products")]
        public List<InterceptedProductResponse> Products { get; set; }
    }
}